﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using KPIS.GERP.GHRMS.MODEL;
using KPIS.GERP.GHRMS.DAL;
using KPIS.GERP.GHRMS.IDAL;
using KPIS.GERP.GHRMS.BLL;
using KPIS.GERP.GHRMS.IBLL;

namespace KPIS.GERP.GHRMS.SERVICE
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
    public class AbsenceReportService : IAbsenceReportService
    {
        //private IAbsenceBLL AbsenceInfo = new AbsenceBLL();

        public string GetData(int value)
        {
            return string.Format("You entered: {0}", value);
        }

        public CompositeType GetDataUsingDataContract(CompositeType composite)
        {
            if (composite == null)
            {
                throw new ArgumentNullException("composite");
            }
            if (composite.BoolValue)
            {
                composite.StringValue += "Suffix";
            }
            return composite;
        }

        public IList<hrm_ps_absence> GetAbsenceDaysData(string emp_seq)
        {
            IList<hrm_ps_absence> lst = new DAL.AbsenceDAL().GetAbsenceDays(emp_seq);
            return lst;
        }

        public IList<rule_absence> GetDaysLimitData(string emp_seq)
        {
            IList<rule_absence> lst = new DAL.AbsenceRuleDAL().GetAbsenceRulesByEmpSeq(emp_seq);
            return lst;
        }
    }
}
